<?php
$this->pageTitle = 'Pridať ponuku/dopyt';
?>
<div class="newForm">
	<h3>Pridať ponuku/dopyt</h3>
	<?php echo $this->Form->create('Market'); ?>
		<fieldset>
		<?php
			echo $this->Form->input('description', array('label' => 'Popis'));

			$options = array(
				0 => 'vyberte typ',
				1 => 'dopyt',
				2 => 'ponuka'
			);
			$params = array('label' => 'Typ', 'options' => $options);
			if (isset($canShowCommission) && $canShowCommission === TRUE) {
				$params['onchange'] = 'displayCommission();';
			}
			echo $this->Form->input('type', $params);
			echo $this->Form->input('fk_client_id', array('label' => 'Klient', 'options' => $clientList));
			echo $this->Form->input('fk_tipster_id', array('label' => 'Tiper', 'options' => $tipsterList));
			echo $this->Form->input('fk_broker_id', array('label' => 'Maklér', 'options' => $brokerList));
			echo $this->Form->input('commission', array('label' => 'Provízia', 'value' => 0, 'div' => array('id' => 'CommissionDiv', 'style'=> 'display:none;')));
		?>
		</fieldset>
	<?php echo $this->Form->end(__('Uložiť')); ?>
</div>